<template>
  <el-dialog :title="'详情查看'" :visible.sync="dialogVisible" width="800px">
    <el-form :model="formData" label-width="120px" :inline="true">
      <el-form-item label="部门">
        <el-input disabled style="width: 220px" v-model="formData.department"></el-input>
      </el-form-item>
      <el-form-item label="业务员">
        <el-input disabled style="width: 220px" v-model="formData.salesman"></el-input>
      </el-form-item>
      <el-form-item label="客户名称">
        <el-input disabled style="width: 220px" v-model="formData.customerName"></el-input>
      </el-form-item>
      <el-form-item label="客户订单号">
        <el-input disabled style="width: 220px" v-model="formData.customerOrder"></el-input>
      </el-form-item>
      <el-form-item label="类别">
        <el-input disabled style="width: 220px" v-model="formData.category"></el-input>
      </el-form-item>
      <el-form-item label="物料代码">
        <el-input disabled style="width: 220px" v-model="formData.materialCode"></el-input>
      </el-form-item>
      <el-form-item label="产品名称">
        <el-input disabled style="width: 220px" v-model="formData.productName"></el-input>
      </el-form-item>
      <el-form-item label="产品型号">
        <el-input disabled style="width: 220px" v-model="formData.productModel"></el-input>
      </el-form-item>
      <el-form-item label="合同备注">
        <el-input disabled style="width: 220px" v-model="formData.contractRemarks"></el-input>
      </el-form-item>
      <el-form-item label="单位">
        <el-input disabled style="width: 220px" v-model="formData.unit"></el-input>
      </el-form-item>
      <el-form-item label="订单数量">
        <el-input disabled style="width: 220px" v-model="formData.orderQuantity"></el-input>
      </el-form-item>
      <el-form-item label="下单日期">
        <el-date-picker disabled v-model="formData.orderDate" type="date" placeholder="选择日期时间"
          format="yyyy-MM-dd"></el-date-picker>
      </el-form-item>
      <el-form-item label="合同交期">
        <el-date-picker disabled v-model="formData.deliveryDate" type="date" placeholder="选择日期时间"
          format="yyyy-MM-dd"></el-date-picker>
      </el-form-item>
      <el-form-item label="变更后交期">
        <el-date-picker disabled v-model="formData.changeDate" type="date" placeholder="选择日期时间"
          format="yyyy-MM-dd"></el-date-picker>
      </el-form-item>
      <el-form-item label="责任工程师">
        <el-input disabled style="width: 220px" v-model="formData.responsibleEngineer"></el-input>
      </el-form-item>
      <el-form-item label="在制状态">
        <el-select disabled v-model="formData.productionStatus" placeholder="请选择">
          <el-option label="待设计" value="待设计"></el-option>
          <el-option label="设计中" value="设计中"></el-option>
          <el-option label="外协中" value="外协中"></el-option>
          <el-option label="待下料" value="待下料"></el-option>
          <el-option label="下料中" value="下料中"></el-option>
          <el-option label="待折弯" value="待折弯"></el-option>
          <el-option label="折弯中" value="折弯中"></el-option>
          <el-option label="待焊接" value="待焊接"></el-option>
          <el-option label="焊接中" value="焊接中"></el-option>
          <el-option label="待喷涂" value="待喷涂"></el-option>
          <el-option label="喷涂中" value="喷涂中"></el-option>
          <el-option label="待组装" value="待组装"></el-option>
          <el-option label="组装中" value="组装中"></el-option>
          <el-option label="返工中" value="返工中"></el-option>
          <el-option label="已完成" value="已完成"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="入库时间">
        <el-date-picker disabled v-model="formData.storageTime" type="date" placeholder="选择日期时间"
          format="yyyy-MM-dd"></el-date-picker>
      </el-form-item>
      <el-form-item label="出货日期">
        <el-date-picker disabled v-model="formData.shippingDate" type="date" placeholder="选择日期时间"
          format="yyyy-MM-dd"></el-date-picker>
      </el-form-item>
      <el-form-item label="是否外协">
        <el-select disabled v-model="formData.outsourced" placeholder="请选择">
          <el-option label="是" value="0"></el-option>
          <el-option label="否" value="2"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="投产数量">
        <el-input disabled style="width: 220px" v-model="formData.productionQuantity"></el-input>
      </el-form-item>
      <el-form-item label="已发货数量">
        <el-input disabled style="width: 220px" v-model="formData.quantityShipped"></el-input>
      </el-form-item>
      <el-form-item label="备注">
        <el-input disabled style="width: 570px" type="textarea" :rows="2" placeholder="请输入内容"
          v-model="formData.remarks">
        </el-input>
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="dialogVisible = false">关闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
import { getInfo } from './helper/api';

export default {
  props: {
  },
  data() {
    return {
      dialogVisible: false,
      formData: {}
    };
  },
  methods: {
    showDialog(data) {
      this.dialogVisible = true;
      getInfo(data.id).then(res => {
        this.formData = res;
      });
    }
  }
};
</script>

<style scoped>
::v-deep .el-form-item.is-disabled .el-input__inner {
  background-color: #f5f7fa;
  border-color: #e4e7ed;
  color: #606266;
}
</style>